package com.cti.commons.mqtt.thread;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * mqtt消费执行拒绝策略
 */
public class MqttConsumeExecutorRejectPolicy implements RejectedExecutionHandler {

    private static final Logger log = LoggerFactory.getLogger(MqttConsumeExecutorRejectPolicy.class);

    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        log.warn("mqtt消费执行拒绝策略 '{}', " + this.getClass().getSimpleName());
    }

}
